﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI;

namespace NLBS.Control
{
   public class PanelSkin:PanelModule
    {
       [TemplateContainer(typeof(DefaultSkinTemplate))]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public override ITemplate ItemTemplate
        {
            get
            {
                return base.ItemTemplate;
            }
            set
            {
                base.ItemTemplate = value;
            }
        }

        public override string Title
        {
            get
            {
                return "切换皮肤";
            }
            set
            {
                base.Title = value;
            }
        }

        protected override void CreateChildControls()
        {
            if (ItemTemplate == null)
                ItemTemplate = new DefaultSkinTemplate();
            base.CreateChildControls();
        }
    }

   public class DefaultSkinTemplate : ITemplate
   {
       public void InstantiateIn(System.Web.UI.Control container)
       {
           container.Controls.Add(new SkinDropDownList());
           
       }
   }
}
